package com.yunxi.service.dubboService.impl.sto;

import com.yunxi.sto.service.ReportPartnerDayDubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import java.lang.reflect.InvocationTargetException;
import com.yunxi.sto.pojo.ReportPartnerDayVO;
import java.util.Map;
import java.util.List;
import org.springframework.beans.BeanUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yunxi.service.localService.sto.ReportPartnerDayService;
import com.yunxi.model.sto.ReportPartnerDay;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Guan
 * @since 2020-03-19
 */
public class ReportPartnerDayDubboServiceImpl implements ReportPartnerDayDubboService {

    @Autowired
    @Qualifier(value = "reportPartnerDayServiceImpl")
    ReportPartnerDayService reportPartnerDayService;


    @Override
    public ReportPartnerDayVO getById(String id) throws InvocationTargetException, IllegalAccessException {
        ReportPartnerDay reportPartnerDay = reportPartnerDayService.getById(id);
        ReportPartnerDayVO reportPartnerDayVO = new ReportPartnerDayVO();
        BeanUtils.copyProperties(reportPartnerDay,reportPartnerDayVO);
        return reportPartnerDayVO;
    }

    @Override
    public void saveOrUpdate(ReportPartnerDayVO reportPartnerDayVO) throws InvocationTargetException, IllegalAccessException {
        ReportPartnerDay reportPartnerDay = new ReportPartnerDay();
        BeanUtils.copyProperties(reportPartnerDayVO,reportPartnerDay);
        reportPartnerDayService.saveOrUpdate(reportPartnerDay);
    }

    @Override
    public void removeById(String id) {
        reportPartnerDayService.removeById(id);
    }

    @Override
    public PageInfo<ReportPartnerDayVO> findPageByVO(ReportPartnerDayVO reportPartnerDayVO, Integer pageNum, Integer pageSize) throws InvocationTargetException, IllegalAccessException {
        PageInfo<ReportPartnerDayVO> pageInfo = reportPartnerDayService.pageByVo(reportPartnerDayVO,pageNum,pageSize);
        return pageInfo;
    }

    @Override
    public void removeByListVo(List<ReportPartnerDayVO> reportPartnerDayVOList) throws IllegalAccessException, InvocationTargetException, InstantiationException {
        reportPartnerDayService.removeByListVo(reportPartnerDayVOList);
    }

    @Override
    public List listByVo(ReportPartnerDayVO reportPartnerDayVO) {
        return reportPartnerDayService.listByVo(reportPartnerDayVO);
    }
}
